import React from 'react'
import store from './redux/store'
import { add } from './redux/actions'
import useSubscribe from './useSubscribe'
export default function Test() {
  console.log('Test组件更新了')
  useSubscribe((state) => {
    return state.zs.count
  },'count')
  return (
    <div>
      <p>{store.getState().zs.count}</p>
      <button
        onClick={() => {
          store.dispatch(add(1))
        }}
      >
        +
      </button>
    </div>
  )
}
